# Maintainer:
pkgname=fcitx5-m17n
pkgver=5.1.0
pkgrel=0
pkgdesc="m17n extra input method support for fcitx5"
url="https://github.com/fcitx/fcitx5-m17n"
# armhf: extra-cmake-modules
#arch="all !armhf"
arch=
license="LGPL-2.1-or-later"
makedepends="
	cmake
	extra-cmake-modules
	gettext-dev
	fcitx5-dev
	fmt-dev
	m17n-lib-dev
	samurai
	"
subpackages="$pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/fcitx/fcitx5-m17n/archive/refs/tags/$pkgver.tar.gz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DENABLE_TEST="$(want_check && echo ON || echo OFF)"
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failre
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
de273de4a01d0c9f23c6b96fe984c97881947907911e3ea60fefc5dcb50e23dcd64a28e891893ed058fe4ec2c2f7f2dbc4a0f8de2957052ff9c5ea5d88f5ff21  fcitx5-m17n-5.1.0.tar.gz
"
